home *** CD-ROM | disk | FTP | other *** search
- /*
- File: NVRAMPlugin.h
-
- Version: Technology:
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __NVRAMPLUGIN__
- #define __NVRAMPLUGIN__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM8_PREEMPTIVE
- /*
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- status codes
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- */
-
- enum {
- kNVRAMNoError = 0,
- kNVRAMTimeout = 1,
- kNVRAMUnexpectedError = 2,
- kNVRAMMemoryError = 3,
- kNVRAMParameterError = 4,
- kNVRAMDeviceError = 5,
- kNVRAMUnexpectedDeviceRequest = 6,
- kNVRAMControllerError = 7,
- kNVRAMConsistencyCheckError = 8
- };
-
- /*
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- Plugin Calls Provided by the Family
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- */
- extern void NVRAMFamRequestComplete(OSStatus theStatus);
-
- /*
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- Plugin Calls Provided by the Plugin
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- all plugin calls are async
- the plugin starts the i/o and returns immediately
- the plugin ISR calls NVRAMFamRequestComplete() when the i/o is completed
- */
- typedef OSStatus (*NVRAMPluginInitPtr)(void );
- typedef OSStatus (*NVRAMPluginReadPtr)(UInt16 offset, UInt8 *data, UInt16 count);
- typedef OSStatus (*NVRAMPluginWritePtr)(UInt16 offset, UInt8 *data, UInt16 count);
-
- enum {
- kNVRAMPluginCurrentRevision = 0x000D11E2
- };
-
- struct NVRAMPluginVersion {
- UInt32 major;
- UInt32 reserved0;
- UInt32 reserved1;
- UInt32 reserved2;
- };
- typedef struct NVRAMPluginVersion NVRAMPluginVersion;
-
- struct NVRAMPluginDispatchTable {
- NVRAMPluginVersion version;
- NVRAMPluginInitPtr Init;
- NVRAMPluginReadPtr Read;
- NVRAMPluginWritePtr Write;
- };
- typedef struct NVRAMPluginDispatchTable NVRAMPluginDispatchTable;
-
- extern OSStatus NVRAMPluginInit(void );
-
- extern OSStatus NVRAMPluginRead(UInt16 offset, UInt8 *data, UInt16 count);
-
- extern OSStatus NVRAMPluginWrite(UInt16 offset, UInt8 *data, UInt16 count);
-
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __NVRAMPLUGIN__ */
-
-